﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WebHosting
{
    // 注意: 如果更改此处的类名 "Service1"，也必须更新 Web.config 中对 "Service1" 的引用。
    public class Service1 : Artech.WcfServices.Contracts.ICalculator 
    {
        public Artech.WcfServices.Services.CalculatorService service = new Artech.WcfServices.Services.CalculatorService();

        #region ICalculator 成员

        /// <summary>
        /// 加法
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        double Artech.WcfServices.Contracts.ICalculator.Add(double x, double y)
        {
            return service.Add(x, y);
        }

        /// <summary>
        /// 减法
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        double Artech.WcfServices.Contracts.ICalculator.Subtract(double x, double y)
        {
            return service.Subtract(x, y);
        }

        /// <summary>
        /// 乘法
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        double Artech.WcfServices.Contracts.ICalculator.Multiply(double x, double y)
        {
            return service.Multiply(x, y);
        }

        /// <summary>
        /// 除法
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        double Artech.WcfServices.Contracts.ICalculator.Divide(double x, double y)
        {
            return service.Divide(x, y);
        }

        #endregion
    }
}
